home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group00b.txt / 000100_icon-group-sender_Tue Oct 24 16:45:38 2000.msg < prev    next >
Internet Message Format  |  2001-01-03  |  1KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id e9ONjNY23055
  4.     for icon-group-addresses; Tue, 24 Oct 2000 16:45:23 -0700 (MST)
  5. Message-Id: <200010242345.e9ONjNY23055@baskerville.CS.Arizona.EDU>
  6. Date: Tue, 24 Oct 2000 13:39:57 -0700
  7. From: Steve Wampler <swampler@noao.edu>
  8. X-Accept-Language: en
  9. To: Parvinder Kaur <kaurp@cs.ucdavis.edu>
  10. CC: icon-group@cs.arizona.edu
  11. Subject: Re: counting lines
  12. Errors-To: icon-group-errors@cs.arizona.edu
  13. Status: RO
  14. Content-Length: 920
  15.  
  16. Parvinder Kaur wrote:
  17. > Hi,
  18. >   I have another problem that I could use help figuring out.  I'm
  19. > suppose to count the number of lines in a text.  The lines should be
  20. > stored in a table as the key and it's associated value is the number of
  21. > times it occurred within the text. i.e.
  22. >  Hi there
  23. >  How are you
  24. >  Hi there
  25. > will look like this
  26. >  Hi there 2
  27. >  How are you 1
  28. > Any help or suggestions will be greatly appreciated.
  29. > Thanks,
  30. >  Cos :)
  31.  
  32. Since this is beginning to look like homework assignments, I'm not
  33. going to give code here.
  34.  
  35. Instead - read about Icon tables in the Icon book or in the on-line
  36. tutorial - this is a problem that can solved in surprisingly few
  37. lines of Icon code.  (Hint: The Icon tables, by there very nature,
  38. provide almost everything you need, once you figure out what the
  39. default value should be.)
  40.  
  41. --
  42. Steve Wampler-  SOLIS Project, National Solar Observatory
  43. swampler@noao.edu
  44.